package com.kuang.demo1;


import java.util.Date;

/**
 * @Title:
 * @Description:
 * 视频类
 * 如何实现克隆：
 *  1.实现cloneable接口
 *  2.重写clone方法
 * @Author: zx
 * @Date: create in 10:10 2020/8/6
 * @Version: 1.0
 */
public class Video implements Cloneable{
    private String name;
    private Date date;

    public Video(String name, Date date) {
        this.name = name;
        this.date = date;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Date getDate() {
        return date;
    }

    public void setDate(Date date) {
        this.date = date;
    }

    @Override
    protected Object clone() throws CloneNotSupportedException {
        return super.clone();
    }

    @Override
    public String toString() {
        return "Video{" +
                "name='" + name + '\'' +
                ", date=" + date +
                '}';
    }
}
